<template>
    <div>登录中...</div>
</template>

<script setup lang="ts">
import { authManager } from '@/lib/auth'
import { useRouter } from 'vue-router';

const router = useRouter();
onMounted(async () => {
    let user = await authManager.signinRedirectCallback()
    if (user) {
        router.push('/')
    } else {
        authManager.signinRedirect()
    }
})
</script>